<?php
/**
 * Copyright © 2016 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */

// @codingStandardsIgnoreFile

 /** @var $block \Magento\Cms\Block\Adminhtml\Wysiwyg\Images\Content\Files */

$_width  = $block->getImagesWidth();
$_height = $block->getImagesHeight();

?>
<?php if ($block->getFilesCount() > 0): ?>
    <?php foreach ($block->getFiles() as $file): ?>
    <div data-row="file" class="filecnt" id="<?php echo $block->escapeHtmlAttr($block->getFileId($file)) ?>">
        <p class="nm" style="height:<?php echo $block->escapeHtmlAttr($_height) ?>px;width:<?php echo $block->escapeHtmlAttr($_width) ?>px;">
        <?php if ($block->getFileThumbUrl($file)):?>
            <img src="<?php echo $block->escapeHtmlAttr($block->getFileThumbUrl($file)) ?>" alt="<?php echo $block->escapeHtmlAttr($block->getFileName($file)) ?>"/>
        <?php endif; ?>
        </p>
        <?php if ($block->getFileWidth($file)): ?>
            <small><?php echo $block->escapeHtml($block->getFileWidth($file)) ?>x<?php echo $block->escapeHtml($block->getFileHeight($file)) ?> <?php echo $block->escapeHtml(__('px.')) ?></small><br/>
        <?php endif; ?>
        <small><?php echo $block->escapeHtml($block->getFileShortName($file)); ?></small>
    </div>
    <?php endforeach; ?>
<?php else: ?>
    <div class="empty"><?php echo $block->escapeHtml(__('No files found')) ?></div>
<?php endif; ?>
